<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
list($msg)=$arguments;
$apikey=pdo_getcolumn('jy_kefu_set',array('uniacid'=>$_SESSION['uniacid']),'jyrobotkey');
$url='http://ai.jinyunweb.com/api/robot.php?apikey='.$apikey.'&question='.$msg;
$res=file_get_contents($url);
$res=json_decode($res,true);
if(is_array($res) && $res['type']=='success'){
	return $res['message'];
}else{
	return 0;
}